#
# @lc app=leetcode.cn id=459 lang=python
#
# [459] 重复的子字符串
#

# @lc code=start
class Solution(object):
    def repeatedSubstringPattern(self, s):
        """
        :type s: str
        :rtype: bool
        """
        n = len(s)
        for i in range(1, n//2+1):
            if n % i == 0:
                match=True
                for j in range(i,n):
                    if s[j]!=s[j-i]:
                        match=False
                        break
                if match:
                    return True

        return False
# @lc code=end

